package com.atguigu.gulimall.auth.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.auth.vo.SocialUser;
import com.atguigu.gulimall.auth.vo.UserLoginVo;
import com.atguigu.gulimall.auth.vo.UserRegistVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author Yanglinfengkk
 */
@FeignClient("gulimall-member")
public interface MemberFeignService {

    /**
     * 会员服务远程注册
     * @param vo
     * @return
     */
    @PostMapping("/member/member/regIst")
    R regIst(@RequestBody UserRegistVo vo);

    /**
     * 会员服务远程登录
     * @param vo
     * @return
     */
    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVo vo);

    /**
     * 微博登录远程接口
     * @param socialUser
     * @return
     * @throws Exception
     */
    @PostMapping("/member/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUser socialUser) throws Exception;


    }
